<?php

class News extends MY_Controller {
    
    function __construct() {
        parent::__construct();
    }
 
    public function index() {
        /* set the view to be loaded inside the basic 'template' view */
        $data['template'] = 'all_news';
        
        $this->load->view('template', $data);  	
    }
    
    public function announcements() {
        $article = new Article();
        $article->where_related_category('id', 1)->order_by('date', 'desc')->get();
        $data['articles'] = $article;
        $data['title'] = 'Announcements';
        $data['template'] = 'news/page_list';
        $this->load->view('template', $data);  	
    }
    
    public function general() {
        $article = new Article();
        $article->where_related_category('id', 7)->order_by('date', 'desc')->get();
        $data['articles'] = $article;
        $data['title'] = 'General News';
        $data['template'] = 'news/page_list';
        $this->load->view('template', $data);  	
    }

}

/* End of file news.php */
/* Location: ./application/controllers/news.php */